<?php
namespace app\qian\controller;

use think\Controller;
use app\qian\model\GmModel as GmModels;
use think\Db;

class Gm extends Controller
{
    private $cModel;   //当前控制器关联模型

    public function _initialize()
    {
        parent::_initialize();
        $this->cModel = new GmModels;   //别名：避免与控制名冲突
    }

    public function index()
    {
        if($this->request->isPost()){
            ECHO 1 ;
        }else{
            $dataList=Db::table('dy_ng')->select();
            $this->assign('dataList', $dataList);
            $name = Db::table('dy_ng')->select();
            $this->assign('name', $name);
            $n = Db::table('dy_company')->select();
            $this->assign('n', $n);
            $na = Db::table('dy_concept')->select();
            $this->assign('na', $na);
            return view('guanyuyouzhan');
        }
    }


}